<?php

namespace app\model\order;

use think\Model;

/**
 * t_order_detail 订单购物详情表
 * @property integer $id (主键)
 * @property integer $old_id 重新关联前id
 * @property integer $order_id 订单id
 * @property integer $order_no 订单号
 * @property integer $goods_id 商品id
 * @property string $goods_name 商品名称
 * @property string $price 单价
 * @property string $logo 商品图片
 * @property integer $sku_id 规格id
 * @property string $sku_name 规格
 * @property integer $num 数量
 * @property string $coupon_amount 均摊优惠券金额
 * @property string $vip_discount 均摊的会员优惠
 * @property integer $refunded_flag 退款状态 1:未退款 2:已退款
 * @property string $refunded_price 已退款金额
 * @property integer $refunded_num 已退款数量
 * @property integer $user_comments 用户是否评价 0:未评价 1:已评价
 * @property string $user_comments_time 评价时间
 * @property integer $merchant_comments 商户是否评价 0:未评价 1:已评价
 * @property string $merchant_comments_time 商户评价时间
 * @property integer $delivery_status 发货状态 0未发货 1已发货
 * @property string $delivery_time 发货时间
 */
class OrderDetail extends Model
{
    /**
     * The connection name for the model.
     *
     * @var string|null
     */
    protected $connection = 'mysql';
    
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 't_order_detail';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $pk = 'id';

    const DELIVERY_STATUS_NO = 0; //未发货
    const DELIVERY_STATUS_YES = 1; //已发货
}
